{include file="head" /}

{include file="menu" /}
<section id="main-content">
    <section class="wrapper">
<form action="{:url('frontend/add')}" method="post" enctype="multipart/form-data">
    <div class="form-group">
        <label for="exampleInputtitle">文章标题</label>
        <input type="text" name="title" class="form-control" id="exampleInputtitle" placeholder="标题">
    </div>
    <div class="form-group">
        <label for="exampleInputPassword1">公告</label>
        <textarea name="textcontent" id="text1" class="form-control" id="exampleInputPassword1" placeholder="公告内容">
        </textarea>
    </div>
    <div class="form-group">
        <div id="div1">
           
        </div>
    </div>

    <div class="form-group">
        <label for="exampleInputFile">图片上传</label>
        <input type="file" name="img" id="exampleInputFile">
        <p class="help-block">轮播图片上传.</p>
    </div>

    <button type="submit" class="btn btn-primary" >创建</button>
</form>
    </section>
    <!--main content end-->
</section>

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/wangeditor@3.1.1/release/wangEditor.min.js"></script>
<script type="text/javascript">
    var E = window.wangEditor
    var editor = new E('#div1')
    var $text1 = $('#text1')
    editor.customConfig.onchange = function (html) {
        // 监控变化，同步更新到 textarea
        $text1.val(html)
    }
    editor.create()
    // 初始化 textarea 的值
    $text1.val(editor.txt.html())
</script>
{include file="foot" /}